//package com.avic.rong.utils;
//
//import android.content.Context;
//
//import com.bumptech.glide.Glide;
//import com.bumptech.glide.GlideBuilder;
//import com.bumptech.glide.load.engine.bitmap_recycle.LruBitmapPool;
//import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory;
//import com.bumptech.glide.load.engine.cache.LruResourceCache;
//import com.bumptech.glide.module.GlideModule;
//
///**
// * Creater: Created by wangyz on 2017/1/21.
// * Email: 936804097@qq.com
// */
//public class GlideConfiguration implements GlideModule {
//
//
//
//    @Override
//    public void applyOptions(Context context, GlideBuilder builder) {
//
//        //Glide磁盘缓存/data/data/com.avic.zhms/cache/image_disk_cache，磁盘缓存给150M
//        builder.setDiskCache(new InternalCacheDiskCacheFactory(context, ConstantsUtils.GLIDE_CACHE_PATH, 150 * 1024 * 1024));
//        //Glide内存缓存
//        int maxMemory = (int) Runtime.getRuntime().maxMemory();//获取系统分配给应用的总内存大小
//        int memoryCacheSize = maxMemory / 8;//设置图片内存缓存占用八分之一
//        builder.setMemoryCache(new LruResourceCache(memoryCacheSize));
//        builder.setBitmapPool(new LruBitmapPool(memoryCacheSize));
//
//    }
//
//    @Override
//    public void registerComponents(Context context, Glide glide) {
//
//    }
//
//}
